﻿#include "expaniter.h"

void Custom::paintTextAndOutline(QPainter *const painter, const QPoint &topLeft, const QString &text,
                                 const QFont &font, const QPen &textPen, const QPen &outlinePen)
{
    painter->setFont(font);
    QRect rect(topLeft, painter->fontMetrics().size(Qt::TextSingleLine, text));

    QPainterPath path;
    path.addText(rect.bottomLeft(), font, text);
    painter->setPen(outlinePen);
    painter->setBrush(outlinePen.brush());
    painter->drawPath(path);
    painter->setPen(textPen);
    painter->drawText(rect.bottomLeft(), text);
}
